import{d as b,a as l,o,b as m,w as a,E as f,W as z,t as p,f as c,e as s,F as h,c as C,U as x,q as y,K as V,p as v,_ as B}from"./index-c80Lh_is.js";import{A as L}from"./AppCollection-jlsv_00S.js";const N=b({__name:"BuiltinGatewayListView",setup(S){return(A,D)=>{const r=l("RouterLink"),d=l("KCard"),g=l("AppView"),_=l("DataSource"),k=l("RouteView");return o(),m(_,{src:"/me"},{default:a(({data:w})=>[w?(o(),m(k,{key:0,name:"builtin-gateway-list-view",params:{page:1,size:10,mesh:"",gateway:""}},{default:a(({route:t,t:i})=>[s(_,{src:`/meshes/${t.params.mesh}/mesh-gateways?page=${t.params.page}&size=${t.params.size}`},{default:a(({data:n,error:u})=>[s(g,null,{default:a(()=>[s(d,null,{default:a(()=>[u!==void 0?(o(),m(f,{key:0,error:u},null,8,["error"])):(o(),m(L,{key:1,class:"builtin-gateway-collection","data-testid":"builtin-gateway-collection","empty-state-message":i("common.emptyState.message",{type:"Built-in Gateways"}),"empty-state-cta-to":i("builtin-gateways.href.docs"),"empty-state-cta-text":i("common.documentation"),headers:[{label:"Name",key:"name"},{label:"Zone",key:"zone"},{label:"Details",key:"details",hideLabel:!0}],"page-number":t.params.page,"page-size":t.params.size,total:n==null?void 0:n.total,items:n==null?void 0:n.items,error:u,onChange:t.update},{name:a(({row:e})=>[s(z,{text:e.name},{default:a(()=>[s(r,{to:{name:"builtin-gateway-detail-view",params:{mesh:e.mesh,gateway:e.name},query:{page:t.params.page,size:t.params.size}}},{default:a(()=>[c(p(e.name),1)]),_:2},1032,["to"])]),_:2},1032,["text"])]),zone:a(({row:e})=>[e.labels&&e.labels["kuma.io/origin"]==="zone"&&e.labels["kuma.io/zone"]?(o(),m(r,{key:0,to:{name:"zone-cp-detail-view",params:{zone:e.labels["kuma.io/zone"]}}},{default:a(()=>[c(p(e.labels["kuma.io/zone"]),1)]),_:2},1032,["to"])):(o(),C(h,{key:1},[c(p(i("common.detail.none")),1)],64))]),details:a(({row:e})=>[s(r,{class:"details-link","data-testid":"details-link",to:{name:"builtin-gateway-detail-view",params:{mesh:e.mesh,gateway:e.name}}},{default:a(()=>[c(p(i("common.collection.details_link"))+" ",1),s(y(x),{display:"inline-block",decorative:"",size:y(V)},null,8,["size"])]),_:2},1032,["to"])]),_:2},1032,["empty-state-message","empty-state-cta-to","empty-state-cta-text","page-number","page-size","total","items","error","onChange"]))]),_:2},1024)]),_:2},1024)]),_:2},1032,["src"])]),_:1})):v("",!0)]),_:1})}}}),K=B(N,[["__scopeId","data-v-f83079e6"]]);export{K as default};
